Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tap from core into Viz extension #5651

Merged
merged 10 commits into from
Feb 9, 2021
Merged

Conversation

kleimkuhler
Copy link
Contributor

Closes #5545.

This change moves all tap and tap-injector code into the viz directory.

The tap and tap-injector components now also use a new tap image—separating
these components from the controller image that they are currently part of. This
means the controller image has removed all its build dependencies related to
tap.

Finally, the tap Protobuf has been separated from the metrics-api and moved into
it's own .proto file and gen directory. This introduces a clear split between
metrics-api and tap Protobuf.

There is no change in behavior for the viz tap command.

Reviewing

Docker images

All the bin directory scripts should be updated to build and load the tap image.
All the CI workflows should be updated to build and push the tap image.

Controller and pkg directories

This is primarily deletions. Most of the deleted code in this directory is now
in the tap directory of the Viz extension.

viz/tap

This is the location that all the tap related code now lives in. New files are
mostly moved from the controller and pkg directories. Imports have all been
updated to point at the right locations and Protobuf.

The Protobuf here is taken from metrics-api and contains all tap-related
Protobuf.

Signed-off-by: Kevin Leimkuhler kevin@kleimkuhler.com

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
@kleimkuhler kleimkuhler requested a review from a team as a code owner February 2, 2021 03:18
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Copy link
Contributor

@Pothulapati Pothulapati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome Work. 👏

Left some suggestions :}

bin/docker-build Show resolved Hide resolved
bin/protoc-go.sh Outdated Show resolved Hide resolved
viz/tap/cmd/main.go Outdated Show resolved Hide resolved
@@ -0,0 +1,184 @@
package pkg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be util instead? referencing this as viz/tap/pkg was really confusing as pkg is this higher level packages directory in golang

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like pkg is okay. I see util naming kind of equivalent; they are both packages that have general helpers that are imported by other packages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I split these into some better named files but still within tap/pkg package. Hopefully that helps in some way.

Copy link
Member

@alpeb alpeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good 👍

viz/tap/Dockerfile Show resolved Hide resolved
viz/tap/Dockerfile Show resolved Hide resolved
viz/tap/Dockerfile Outdated Show resolved Hide resolved
viz/metrics-api/Dockerfile Outdated Show resolved Hide resolved
web/srv/api_handlers.go Outdated Show resolved Hide resolved
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
bin/docker-build-tap Show resolved Hide resolved
bin/docker-push Outdated Show resolved Hide resolved
bin/image-load Show resolved Hide resolved
viz/tap/api/server.go Outdated Show resolved Hide resolved
viz/tap/cmd/main.go Outdated Show resolved Hide resolved
…split

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Copy link
Member

@adleong adleong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and everything works as expected for me. However, I do see a slightly concerning warning in the tap and tap-injector logs:

2021/02/04 00:20:17 WARNING: proto: file "tap.proto" is already registered
	previously from: "github.com/linkerd/linkerd2/viz/tap/gen/tap"
	currently from:  "github.com/linkerd/linkerd2-proxy-api/go/tap"
A future release will panic on registration conflicts. See:
https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
@kleimkuhler
Copy link
Contributor Author

@adleong Thanks good catch. Renamed to viz_tap.proto.

Copy link
Member

@alpeb alpeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

…split

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
@kleimkuhler kleimkuhler merged commit 75fcc9d into main Feb 9, 2021
@kleimkuhler kleimkuhler deleted the kleimkuhler/tap-core-split branch February 9, 2021 17:43
jijeesh pushed a commit to jijeesh/linkerd2 that referenced this pull request Mar 23, 2021
Closes linkerd#5545.

This change moves all tap and tap-injector code into the viz directory. 

The tap and tap-injector components now also use a new tap image—separating
these components from the controller image that they are currently part of. This
means the controller image has removed all its build dependencies related to
tap.

Finally, the tap Protobuf has been separated from the metrics-api and moved into
it's own `.proto` file and gen directory. This introduces a clear split between
metrics-api and tap Protobuf.

There is no change in behavior for the `viz tap` command.

### Reviewing

#### Docker images

All the bin directory scripts should be updated to build and load the tap image.
All the CI workflows should be updated to build and push the tap image.

#### Controller and pkg directories

This is primarily deletions. Most of the deleted code in this directory is now
in the tap directory of the Viz extension.

#### viz/tap

This is the location that all the tap related code now lives in. New files are
mostly moved from the controller and pkg directories. Imports have all been
updated to point at the right locations and Protobuf.

The Protobuf here is taken from metrics-api and contains all tap-related
Protobuf.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Jijeesh <jijeesh.ka@gmail.com>
jijeesh pushed a commit to jijeesh/linkerd2 that referenced this pull request Apr 21, 2021
Closes linkerd#5545.

This change moves all tap and tap-injector code into the viz directory. 

The tap and tap-injector components now also use a new tap image—separating
these components from the controller image that they are currently part of. This
means the controller image has removed all its build dependencies related to
tap.

Finally, the tap Protobuf has been separated from the metrics-api and moved into
it's own `.proto` file and gen directory. This introduces a clear split between
metrics-api and tap Protobuf.

There is no change in behavior for the `viz tap` command.

### Reviewing

#### Docker images

All the bin directory scripts should be updated to build and load the tap image.
All the CI workflows should be updated to build and push the tap image.

#### Controller and pkg directories

This is primarily deletions. Most of the deleted code in this directory is now
in the tap directory of the Viz extension.

#### viz/tap

This is the location that all the tap related code now lives in. New files are
mostly moved from the controller and pkg directories. Imports have all been
updated to point at the right locations and Protobuf.

The Protobuf here is taken from metrics-api and contains all tap-related
Protobuf.

Signed-off-by: Kevin Leimkuhler <kevin@kleimkuhler.com>
Signed-off-by: Jijeesh <jijeesh.ka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move tap and tap-injector code to viz directory
4 participants